import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'

import VCharts from 'v-charts'

import { NavBar, Row, Col, Tab, Tabs, Panel, Divider, Sidebar, SidebarItem, Skeleton, DropdownMenu, DropdownItem,
  List, RadioGroup, Radio, CellGroup, Cell, Image, Button, Field, Uploader, Picker, Popup, Toast } from 'vant'
import 'amfe-flexible'
import VueAMap from 'vue-amap'
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
  key: '2045c68633575a3a8e63463ad82afccd',
  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.Geolocation'],
  // 默认高德 sdk 版本为 1.4.4
  v: '1.4.4'
})

Vue.use(NavBar).use(Row).use(Col).use(Tab).use(Tabs).use(Panel).use(Divider).use(Sidebar).use(SidebarItem).use(Skeleton)
  .use(DropdownMenu).use(DropdownItem).use(List).use(RadioGroup).use(Radio).use(CellGroup).use(Cell).use(Image).use(Button)
  .use(Field).use(Uploader).use(Picker).use(Popup).use(Toast)

Vue.prototype.$VueAMap = VueAMap
Vue.prototype.$http = axios
Vue.config.productionTip = false

Vue.use(VCharts)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
